package cloud.xlh.my_system.common;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2022/6/11 20:29
 * @ Description:
 */
public enum ResultEnum {
    LOCK_IP("I", "ip已被锁定"),
    ;
    private static final Set<String> enumSet = new HashSet<>(50);

    static {
        Arrays.asList(ResultEnum.values()).forEach(e -> enumSet.add(e.getCode()));
    }

    public static boolean hasEnum(String code) {
        return enumSet.contains(code);
    }

    //code
    private String code;

    //描述
    private String desc;

    ResultEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }
    public String getDesc() {
        return desc;
    }
}
